package com.welyo.view.quizz.instruction {
	import com.welyo.view.quizz.event.QuizzEvent;
	import flash.display.MovieClip;
	import flash.display.Sprite;
	import flash.events.MouseEvent;
	import flash.text.TextFieldAutoSize;
	
	/**
	 * ...
	 * @author vu.doan
	 */
	public class Instruction extends MovieClip {
		
		public function Instruction() {
			txtDes.autoSize = TextFieldAutoSize.LEFT;
			
			mcStart.buttonMode = true;
			mcStart.addEventListener(MouseEvent.CLICK, onClickStartHandler);
		}
		
		public function setInstruction(title:String, des:String, starttitle:String):void {
			txtTitle.text = title;
			txtTitleShadow.text = title;
			txtDes.htmlText = des;
		}
		
		private function onClickStartHandler(evt:MouseEvent):void {
			dispatchEvent(new QuizzEvent(QuizzEvent.START_GAME));
		}
	}
}